// ==========================================================================
// GFast自动生成service操作代码。
// 生成日期：2024-04-24 18:08:26
// 生成路径: internal/app/business/service/books.go
// 生成人：周志雄
// desc:场次座位预定
// company:云南奇讯科技有限公司
// ==========================================================================

package service

import (
	"context"
	"github.com/tiger1103/gfast/v3/api/v1/business"
	"github.com/tiger1103/gfast/v3/internal/app/business/model"
)

type IBooks interface {
	List(ctx context.Context, req *business.BooksSearchReq) (res *business.BooksSearchRes, err error)
	GetById(ctx context.Context, Id int) (res *model.BooksInfoRes, err error)
	Add(ctx context.Context, req *business.BooksAddReq) (err error)
	Edit(ctx context.Context, req *business.BooksEditReq) (err error)
	Delete(ctx context.Context, Id []int) (err error)
	Choose(ctx context.Context, req *business.ChooseSeatsReq) (err error)
}

var localBooks IBooks

func Books() IBooks {
	if localBooks == nil {
		panic("implement not found for interface IBooks, forgot register?")
	}
	return localBooks
}

func RegisterBooks(i IBooks) {
	localBooks = i
}
